<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<html>
<head>
    <title>列表学生</title>
    <style>
        .table{
            text-align: center;
        }
    </style>
    <%--1.引入bs的css样式--%>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css">
    <%--2.引入jquery--%>
    <script src="${pageContext.request.contextPath}/bootstrap/js/jquery-2.2.3.min.js"></script>
    <%--3.引入bs的js库--%>
    <script src="${pageContext.request.contextPath}/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
    <div class="page-header">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <h3>学生列表</h3>
                </h3>
            </div>
            <table class="table">
                <tr>
                    <td>学号</td>
                    <td>姓名</td>
                    <td>性别</td>
                    <td>年龄</td>
                    <td>所在班级</td>
                </tr>
                <c:forEach items="${list}" var="stud">
                    <tr>
                        <td>${stud.stuno}</td>
                        <td>${stud.stuname}</td>
                        <td>${stud.classno}</td>
                        <td>${stud.sex}</td>
                        <td>${stud.age}</td>

                        <td>
                            <a href="${pageContext.request.contextPath}/student?cmd=toUpdate&sid=${stud.stuno}" class="btn btn-primary btn-sm">修改</a>
                            <a href="${pageContext.request.contextPath}/student?cmd=delete&sid=${stud.stuno}" onclick="return confirm('你真的要删除吗?')"
                               class="btn btn-danger btn-sm">删除</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>
            <div class="panel-footer text-right">
                <a href="${pageContext.request.contextPath}/student?cmd=toAdd" class="btn btn-success btn-sm">添加</a>
                泽林教育2010-2020.
            </div>
        </div>
    </div>
</div>


</body>
</html>
